Skip to content

docs/reuse-audit: record the shipped DSH version and gate the recipe against the pin - #3494

Merged
Birfy merged 1 commit into
mainfrom
dev/3493-dsh-record-drift
Dec 2, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/3493-dsh-record-drift

Conversation

@Birfy

@Birfy Birfy commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

What changed

docs/reuse-audit/shipped-pins.json recorded image_recipe.dsh as 0.2.2-rc.1 while runtime/ds-bot-upstream.pin.json pins 0.2.2-rc.5 and the recipe installs exactly that (the DSH_VERSION build-arg). Nothing compared the two, so the delivery record and the shipped artifact could disagree silently.

This slice makes the record say what ships and makes the disagreement a check failure:

  • image_recipe.dsh becomes 0.2.2-rc.5, with a sibling dsh_audit_snapshot: 0.2.2-rc.1.
  • A new audit_status block inside the dsh_0_2_2_rc_1 record carries audited_version (rc.1), shipped_version (rc.5), shipped_version_audited: false, the rc.5 npm tarball integrity/shasum/file counts, and a blocker sentence: the inventory covers rc.1 (20 files, 76,416 bytes unpacked), the shipped rc.5 tarball is 536 files / 6,230,712 bytes unpacked and was not read file by file, so the inventory must not be read as an audit of what ships and no redistributable image may be published on it.
  • scripts/verify-reuse-audit-pins.py now requires image_recipe.dsh to equal the pin, the snapshot to name the audited npm version, shipped_version to equal the pin, and shipped_version_audited to be exactly false.
  • tests/test_shipped_licenses.py asserts the same invariants.

No licence text changes, no dependency changes, no version claims beyond what the pin and the registry say.

Why the gate is needed

verify-reuse-audit-pins.py only read the dsh_0_2_2_rc_1 record (npm integrity, git tag, libreoffice kit); tests/test_shipped_licenses.py asserted phrases inside that record. Neither looked at image_recipe. The merged #3491 changed the image's DSH version and did not touch this record, which is exactly the drift that stayed invisible.

Evidence (local, on this host, not CI)

Replayed on a clean 1f62d02b1df63ca8bd5215c7469c39223f4d7406 tarball; base tree rebuilt as 74859f440f2584fde3954984e466eb4584ea7df0, which is the tree GitHub reports for that commit. Patch applies with git apply --check rc 0 and write-tree gives c6a01ad43494362edca297e5f1ba3f6097835171; the branch commit ede26cd4229557b4e48d54fbf435f894da1548fd has that tree.

  • Positive: python3 scripts/verify-reuse-audit-pins.py -> rc 0, 29 OK lines, including OK image recipe DSH 0.2.2-rc.5 matches the pin; audited snapshot 0.2.2-rc.1 records the shipped version as unaudited.
  • Negative: setting image_recipe.dsh back to 0.2.2-rc.1 -> FAIL: image_recipe.dsh '0.2.2-rc.1' != pin dsh '0.2.2-rc.5', rc 1.
  • python3 -m unittest tests.test_shipped_licenses -> 5 tests OK.
  • Full suites on the same tree: python unittest discover and node --test --test-concurrency=2 tests/*.test.mjs.

This is a local reading only; CI results are separate and are not claimed here.

Scope

Docs, one verification script and one test file. One reviewable slice; no product behaviour changes.

Refs #3493

…against the pin

`shipped-pins.json` still named DSH 0.2.2-rc.1 as the image version while
`runtime/ds-bot-upstream.pin.json` pins 0.2.2-rc.5 and the recipe installs
exactly that. The inventory in that record was built from the rc.1 tarball
(20 files, 76,416 bytes unpacked); the shipped rc.5 tarball is 536 files,
6,230,712 bytes unpacked and was never read file by file.

- image_recipe.dsh -> 0.2.2-rc.5, plus dsh_audit_snapshot 0.2.2-rc.1
- audit_status block in the rc.1 record: audited_version, shipped_version,
  shipped_version_audited false, rc.5 tarball integrity/shasum/size, and a
  blocker that forbids reading the inventory as an audit of what ships
- verify-reuse-audit-pins.py: image_recipe.dsh must equal the pin, the
  snapshot must name the audited npm version, and the record must not claim
  the shipped version was audited
- tests/test_shipped_licenses.py: same invariants

Refs #3493
@github-actions github-actions Bot added the risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff label Dec 2, 2026
@Birfy
Birfy added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit b380e62 Dec 2, 2026
18 checks passed
@Birfy
Birfy deleted the dev/3493-dsh-record-drift branch December 2, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant